package com.stylefeng.guns.modular.vpn.config;

import com.stylefeng.guns.modular.vpn.mquartz.QuartzManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * 启动时执行定时任务
 * 定时检查提醒信息时间是否可执行
 */
//@Component
public class RemindTimerConfig implements CommandLineRunner {
    @Autowired
    private QuartzManager quartzManager;

    @Override
    public void run(String... args) throws Exception {
        //开启定时任务
//        quartzManager.addCroJob("statisticsJob","statisticsGroup",
//                "statisticsTriggerName","statisticsTriggerGroup",
//                "0 0 0 * * ?");

//        quartzManager.disConnectJob("disConnectionJob","disConnectionGroup",
//                "disConnectionTriggerName","disConnectionTriggerGroup",
//                "0 0 0 * * ?");
    }
}
